home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pascal Super Library
/
Pascal Super Library (CW International)(1997).bin
/
DELPHI32
/
SYS_TOOL
/
MULTI020
/
MULTI020.ZIP
/
MPTTYCRT.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1993-09-08
|
673b
|
33 lines
unit MPTtyCrt;
{ Provides client which dumps output from pipe to the screen }
interface
uses crt, multi, mpipes;
procedure AttachOutputToCRT(m : pPipe);
{ Start a client which reads characters from the pipe and outputs it
to the screen using CRT. }
implementation
procedure OutputToCRT(var m); far;
var
p : tPipe absolute m;
ch : char;
begin
t^.hasexit := true;
p.NewOutputTask;
repeat
ch := p.Get;
if not t^.Poisoned then write(ch);
if Switch then break
until false;
p.NoMoreOutput
end;
procedure AttachOutputToCRT(m : pPipe);
begin
Fork(OutputToCRT,2048,m^{$IFDEF DEBUG},'OutputToCRT'{$ENDIF})
end;
end.